var routes = [
  {
    path: '/index',
    name: 'index',
    component: () => import('../views/index.vue'),
    children:[
      {
        path:'/index/shangpin',//路由地址
        name:'shangpin',//路由地址的别名
        component:()=>import('../views/index/shangpin.vue'),//对应的组件,
      },
      {
        path:'/index/bbt',//路由地址
        name:'bbt',//路由地址的别名
        component:()=>import('../views/index/bbt.vue'),//对应的组件,
      },
      {
        path:'/index/dingdan',//路由地址
        name:'dingdan',//路由地址的别名
        component:()=>import('../views/index/dingdan.vue'),//对应的组件,
      },
      {
        path:'/index/mine',//路由地址
        name:'mine',//路由地址的别名
        component:()=>import('../views/index/mine.vue'),//对应的组件,
      },
        
    ]
  },
  {
    path: '/detail/:id',
    name:'detail',
    component:()=>import('../views/detail.vue')
},
{
  path:'/login',
  name:'login',
  component:()=>import('../views/login.vue')
},
    {
      path:'/',
      name:'/index/shangpin',
      component:()=>import('../views/index/shangpin.vue')
  },
  
  {
    path:'/:error(.*)',
    component:()=>import('../views/NotFind.vue')
},
]

export default routes;